﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="EmergencyOut.aspx.cs" Inherits="lcs.Web.Outstorage.EmergencyOut" %>
<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
     <script type="text/javascript">
         function checksel() {
             if ($("#<%= GridView1.ClientID %> tr :checkbox:checked").length > 0)
                 return true;
             else
             { alert('没有选择任何行！'); return false; }

         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <div style=" margin-top:10px; margin-bottom:10px; text-align: left;">
     请选择出库项目：<asp:DropDownList ID="ddl_project" runat="server">
    </asp:DropDownList>
        &nbsp;,物料描述：<asp:TextBox ID="txt_material" runat="server"></asp:TextBox>
    <asp:Button ID="btn_selectProject" runat="server" 
        onclick="btn_selectProject_Click" Text="出库单" />
</div>
<div style=" margin-top:10px; margin-bottom:10px;">
    <asp:GridView ID="GridView1" runat="server" Width="100%" 
        AutoGenerateColumns="False" AllowPaging="True" 
        onpageindexchanging="GridView1_PageIndexChanging">
        <Columns>
            <asp:TemplateField HeaderText="选择">
                    <HeaderTemplate>
                          <input id="cbo_checkAll" type="checkbox" onclick="checkall(this)" />全选
                   </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="cbo_check" runat="server" />
                    <asp:Label ID="lbl_inid" runat="server" Text='<%# Bind("inid") %>' Visible ="false"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="预出库数量">
                <ItemTemplate>
                    <asp:TextBox ID="txt_out_storage_count" runat="server" Width="50px"></asp:TextBox>
                    <asp:Label ID="lbl_material_id" runat="server" Text='<%# Bind("mid") %>' 
                        Visible="False"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="剩余数量">
                <ItemTemplate>
                    <asp:Label ID="lbl_realCount" runat="server" Text='<%# Bind("realCount") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("realCount") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="数量单位">
                <ItemTemplate>
                    <asp:Label ID="lbl_unit" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("unit") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="项目编号">
                <ItemTemplate>
                    <asp:Label ID="lbl_proid" runat="server" Text='<%# Bind("proid") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("proid") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="项目名称">
                <ItemTemplate>
                    <asp:Label ID="lbl_projectname" runat="server" 
                        Text='<%# Bind("projectname") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("projectname") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="物料描述">
                <ItemTemplate>
                    <asp:Label ID="lbl_material" runat="server" Text='<%# Bind("material") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("material") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle CssClass="mypager" />
    </asp:GridView>
</div>

<div style=" text-align:left">
    
    出库时间：<asp:TextBox 
        ID="txt_out_storage_Estimate" runat="server" 
                        
        onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"></asp:TextBox>
    ，接收人：<asp:TextBox ID="txt_receive_userName" runat="server" Width="100px"></asp:TextBox>
    ，接收人电话：<asp:TextBox ID="txt_receive_userPhone" runat="server" Width="100px"></asp:TextBox>
    &nbsp;</div>
<div style=" margin-top:10px; margin-bottom:10px; text-align:left;">
    到货地点：<asp:TextBox ID="txt_receive_address" runat="server" Width="526px"></asp:TextBox>
</div>
<div style=" margin-top:10px; margin-bottom:10px;">
    <asp:Button ID="btn_add" runat="server" Text="添加" 
        onclick="btn_add_Click" OnClientClick="return checksel();" />
&nbsp;
    <asp:Button ID="btn_re" runat="server" Text="重置" 
        onclick="btn_re_Click" />
</div>
<div>
    <div style=" text-align:center; font-weight:bold; font-size:18px; margin-bottom:10px; margin-top:10px;">
        应 急 出 库 清 单 </div>
    <div>
    <asp:GridView ID="GridView2" runat="server" Width="100%" 
        AutoGenerateColumns="False">
        <Columns>
            <asp:BoundField DataField="out_storage_count" HeaderText="预出库数量" />
            <asp:BoundField DataField="material" HeaderText="物料描述" />
            <asp:BoundField DataField="unit" HeaderText="数量单位" />
            <asp:BoundField DataField="projectname" HeaderText="项目名称" />
            <asp:BoundField DataField="proid" HeaderText="项目编号" />
            <asp:BoundField DataField="mid" HeaderText="物料ID" Visible="False" />
        </Columns>
    </asp:GridView>
    </div>
</div>
<div style=" margin-top:10px; margin-bottom:10px;">
      <asp:Button ID="btn_submit" runat="server" Text="提交" 
          onclick="btn_submit_Click"  />
</div>
</asp:Content>
